package com.yykj.hospital.server.model.repository;

import com.yykj.hospital.server.model.entity.HospitalDoctor;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HospitalDoctorRepository extends JpaRepository<HospitalDoctor,String> , JpaSpecificationExecutor<HospitalDoctor> {
    List<HospitalDoctor> findAllByHospitalIdAndHotStatusAndNeedShowOrderBySorting(Integer hospitalId,Boolean hotStatus,Boolean needShow);

    List<HospitalDoctor> findAllByMobileIn(List<String> mobiles);

    List<HospitalDoctor> findAllByHospitalIdAndDoctorIdIn(Integer hospitalId,List<String> doctorIds);

    List<HospitalDoctor> findAllByDoctorIdIn(List<String> doctorIds);

    List<HospitalDoctor> findAllByHospitalIdAndDepIdAndEnableStatus(Integer hospitalId,Integer depId,Boolean status);

    HospitalDoctor findByMobile(String mobile);

    List<HospitalDoctor> findAllByTencentAccountIdIn(List<String> tencentIds);

}
